#! /bin/sh

name=libxcrypt
version=4.4.38
revision=1
tarball_url="https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"
tarball_blake2b="42d594fe36f61a1b5343d9fda22541b09373fe74c587537db8203f9c92120b6c73edef2e1b3d7febda14ae979845405b5fdaeb31dd2b89eedc423b0924ea7cff"
imagedeps="python3-passlib"
hostdeps="gcc pkg-config"
deps="mlibc libgcc libstdc++ libatomic"

prepare() {
    autotools_recursive_regen
}

configure() {
    autotools_configure \
        --enable-obsolete-api=yes \
        --disable-xcrypt-compat-files
}

build() {
    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
